package uaiContacts.model;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Droog
 */
@Embeddable
public class LancamentoFincancPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_lancamento_financ", nullable = false)
    private int idLancamentoFinanc;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_igreja", nullable = false)
    private int idIgreja;

    public LancamentoFincancPK() {
    }

    public LancamentoFincancPK(int idLancamentoFinanc, int idIgreja) {
        this.idLancamentoFinanc = idLancamentoFinanc;
        this.idIgreja = idIgreja;
    }

    public int getIdLancamentoFinanc() {
        return idLancamentoFinanc;
    }

    public void setIdLancamentoFinanc(int idLancamentoFinanc) {
        this.idLancamentoFinanc = idLancamentoFinanc;
    }

    public int getIdIgreja() {
        return idIgreja;
    }

    public void setIdIgreja(int idIgreja) {
        this.idIgreja = idIgreja;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idLancamentoFinanc;
        hash += (int) idIgreja;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof LancamentoFincancPK)) {
            return false;
        }
        LancamentoFincancPK other = (LancamentoFincancPK) object;
        if (this.idLancamentoFinanc != other.idLancamentoFinanc) {
            return false;
        }
        if (this.idIgreja != other.idIgreja) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.LancamentoFincancPK[ idLancamentoFinanc=" + idLancamentoFinanc + ", idIgreja=" + idIgreja + " ]";
    }
    
}